package com.numberone.web.controller.activity;

import java.util.List;

import com.numberone.system.service.IBannerService;
import com.numberone.system.util.JsonResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import com.numberone.common.annotation.Log;
import com.numberone.common.enums.BusinessType;
import com.numberone.system.domain.Activity;
import com.numberone.system.service.IActivityService;
import com.numberone.framework.web.base.BaseController;
import com.numberone.common.page.TableDataInfo;
import com.numberone.common.base.AjaxResult;
import com.numberone.common.utils.poi.ExcelUtil;

/**
 * 活动分类 信息操作处理
 * 
 * @author 于沛麟
 * @date 2020-09-27
 */
@RestController
@RequestMapping("/api/activity")
public class ActivityApiController extends BaseController
{
	@Autowired
	private IActivityService activityService;
	@Autowired
	private IBannerService bannerService;
	
//	@GetMapping("/get")
//	public Object getActivity(){
//		List<Activity> activities = activityService.query();
//
//		if(activities.isEmpty()){
//
//			return JsonResult.nodata();
//		}
//
//		return JsonResult.success(activities);
//	}

	/**
	 */
	@PostMapping("/get")
	public Object getBanner(){

		List<Activity> activities  =  bannerService.selectTypeList();
		System.out.println(activities+"==========================");
		return JsonResult.success(activities);
	}
}
